"""
设备管理应用 API URL配置
"""
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .api_views import (
    DeviceViewSet, DeviceBrandViewSet, DeviceTypeViewSet, 
    PlatformCredentialViewSet, DeviceCommandViewSet
)

# 创建路由器
router = DefaultRouter()
router.register(r'devices', DeviceViewSet, basename='device')
router.register(r'brands', DeviceBrandViewSet, basename='device-brand')
router.register(r'types', DeviceTypeViewSet, basename='device-type')
router.register(r'credentials', PlatformCredentialViewSet, basename='platform-credential')
router.register(r'commands', DeviceCommandViewSet, basename='device-command')

urlpatterns = [
    # 路由器生成的URL
    path('', include(router.urls)),
]